# include"Sqlist.h"

//将La(2,3,5),Lb(4,9,3,6)合并为新的线性表Lc,对重复的元素只保留一个
int main (void)
{
    SqList La,Lb;
    //动态为a,b分配空间
    InitList_Sq(La);
    InitList_Sq(Lb);
    int a[] = {2,3,5};
    int b[] = {4,9,3,6};
    //cout<<b[0];
    //将数组元素插入到线性表中
    int i = 0;
    for (i= 0;i<3;i++)
    {
        ListInsert(La,i+1,a[i]);
    }
    for (i =0;i<4;i++)
        ListInsert(Lb,i+1,b[i]);
   cout<< La.elem[1].num<<endl;
    DisplayList(La);
    DisplayList(Lb);
}
